package com.ivy.controller.AiClient.controller;

import com.ivy.controller.AiClient.bean.ChatCompletionResponse;
import com.ivy.controller.AiClient.service.IAiClientService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: liuYifan
 * @CreateTime: 2025-02-21  11:23
 * @Description: TODO
 */
@RestController
@RequestMapping("/AiClient")
public class AiClientController {

    @Resource
    private IAiClientService iDeepSeekService;

    @GetMapping(value = "/deepseek/chat")
    public ChatCompletionResponse generateStreamAsString(@RequestParam(value = "message") String message) {
       return iDeepSeekService.generateStreamAsString(message);
    }

    }
